import { Injectable } from '@angular/core';
import { COMMON_API_BASIC_PATH } from '../core/consts';
import { HttpClient } from '@angular/common/http';
import { SystemCfg } from '../modules/config/cfg-system/cfg-system.service';


const api = {
  systemInfo: () => `${COMMON_API_BASIC_PATH}/system_info`,
};

@Injectable({
  providedIn: 'root'
})
export class RootService {

  constructor(
    private httpClient: HttpClient,
  ) {
  }

  getSystemInfo() {
    return this.httpClient.get<SystemCfg>(api.systemInfo());
  }
}
